package com.geen.tuoke.ui.dialog

import android.content.Context
import androidx.databinding.DataBindingUtil
import com.geen.tuoke.R
import com.geen.tuoke.databinding.DialogCustomBinding
import com.geen.tuoke.utils.ext.dp2px
import com.geen.tuoke.widget.dialog.DialogViewHolder
import com.geen.tuoke.widget.dialog.XXDialog

/**
 * @Author LuoJi
 * @Date 2021/12/30-16:14
 * @Desc 客服微信弹框
 */
class DialogCustom(context:Context):XXDialog(context, R.layout.dialog_custom) {

    private var mBinding : DialogCustomBinding? = null

    init {

        setWidthAndHeight(dp2px(288f), dp2px(180f))
        setCanceledOnTouchOutside(false)

    }

    override fun convert(holder: DialogViewHolder) {
        mBinding = DataBindingUtil.bind(holder.convertView)
        mBinding?.run {
            btnCancel.setOnClickListener {
                dismiss()
            }
        }
    }
}